
export const BASE_URL = 'http://192.168.109.133';

export const IMAGE_BASE_URL = 'http://192.168.109.133:39000';



export const statusOptions = [
    {
      value: 1,
      label: '预发布',
    },
    {
      value: 2,
      label: '在线',
    },
    {
      value: 3,
      label: '已下线',
    },
]

export const formatStatus= (val) => {
    if (val) {
        for (let [index, value] of Object.entries(statusOptions)) {
            if (value.value == val) {
                return value.label
            }
        }
    } else {
        return ""
    }
}

export const conditionPictureStatusOptions = [
  {
    value: 1,
    label: '不可用',
  },
  {
    value: 2,
    label: '可用',
  },
]

export const formatSelectType= (val) => {
  if (val) {
      for (let [index, value] of Object.entries(conditionSelectType)) {
          if (value.value == val) {
              return value.label
          }
      }
  } else {
      return '未定'
  }
}

export const conditionSelectType = [
  {
    value: 1,
    label: '单选',
  },
  {
    value: 2,
    label: '多选',
  },
]


export const enableOptions = [
  {
    value: 1,
    label: '可用',
  },
  {
    value: 2,
    label: '不可用',
  },
]

export const formatEnable= (val) => {
  if (val) {
      for (let [index, value] of Object.entries(enableOptions)) {
          if (value.value == val) {
              return value.label
          }
      }
  } else {
      return ""
  }
}